/*
 * @Author: YeFei
 * @Date: 2021-11-05 09:17:22
 * @LastEditTime: 2021-12-06 19:57:54
 * @Descripttion:
 */
/*
 * @Author: YeFei
 * @Date: 2021-11-05 09:17:22
 * @LastEditTime: 2021-11-06 14:02:33
 * @Descripttion:
 */
import Vue from "vue"
import App from "./App.vue"
import router from "./router"
import store from "./store"

Vue.config.productionTip = false

// ant
import "ant-design-vue/dist/antd.less"
import Antd from "ant-design-vue"

import './utils/filter'

import { Icon } from 'ant-design-vue';

Icon.setTwoToneColor('#4AAF6C');    //设置图标的默认主色

Vue.use(Antd)

// 导入阿里字体图标
import '@/assets/icon/iconfont.css'

import Modal from 'ant-design-vue/lib/modal/index' //引入模态
Vue.prototype.$modal = Modal //这里引入提示

// other
import qrcode from "vue-qrcode-directive"
import less from "less"
Vue.use(less)
Vue.use(qrcode)

import "./assets/style/index.css"

//复制
import VueClipboard from "vue-clipboard2"
Vue.use(VueClipboard)

//自定义组件
import utils from "@/utils"
Vue.use(utils)

import myComponents from "@/components"
Vue.use(myComponents)

//图片预览
import "viewerjs/dist/viewer.css"
import Viewer from "v-viewer"
Vue.use(Viewer)

// 地图
import VueAMap from "vue-amap"
const amapKeys = Object.keys(localStorage).filter((key) => key.match(/^_AMap_/))
amapKeys.forEach((key) => {
  localStorage.removeItem(key)
})
Vue.use(VueAMap)

VueAMap.initAMapApiLoader({
  key: "3dc4ecbd8abe5da75a702f774fa2b6f2",
  plugin: [
    "Geolocation",
    "AMap.Geocoder",
    "AMap.Autocomplete", //输入提示插件
    "AMap.PlaceSearch", //POI搜索插件
    "AMap.Scale", //右下角缩略图插件 比例尺
    "AMap.OverView", //地图鹰眼插件
    "AMap.ToolBar", //地图工具条
    "AMap.MapType", //类别切换控件，实现默认图层与卫星图、实施交通图层之间切换的控制
    "AMap.PolyEditor", //编辑 折线多，边形
    "AMap.CircleEditor", //圆形编辑器插件
    "AMap.Geolocation", //定位控件，用来获取和展示用户主机所在的经纬度位置
  ],
  // 默认高德 sdk 版本为 1.4.4
  v: "1.4.4",
})

new Vue({
  render: (h) => h(App),
  router,
  store,
}).$mount("#app")
